import request from '@/utils/request'

export function getExam() {
  return request({
    url: '/ems/exam/list',
    method: 'get'
  })
}

export function addExam(data) {
  return request({
    url: '/ems/exam/add',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function preview(data) {
  return request({
    url: '/ems/exam/preview',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function editExam(data) {
  return request({
    url: '/ems/exam/edit',
    method: 'post',
    data
  })
}

export function deleteExam(data) {
  return request({
    url: '/ems/exam/delete',
    method: 'delete',
    params: data
  })
}

export function deleteBatchExam(data) {
  return request({
    url: '/ems/exam/deleteBatch',
    method: 'delete',
    params: data
  })
}
